package com.elf.bluetoothtest.widget;

import android.bluetooth.BluetoothGattService;
import android.content.Context;
import android.util.AttributeSet;
import android.view.LayoutInflater;

import com.elf.bluetoothtest.databinding.WidgetServiceBinding;

public class ServiceWidget extends AbsFrameLayout {

    private WidgetServiceBinding binding;

    public ServiceWidget(Context context) {
        super(context);
    }

    public ServiceWidget(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    @Override
    protected void initView(AttributeSet attrs) {
        binding = WidgetServiceBinding.inflate(LayoutInflater.from(getContext()), this, true);
    }

    public void setData(BluetoothGattService service) {
        binding.tvService.setText("uuid:" + service.getUuid().toString().toUpperCase());
    }
}
